#include "UR_GOTO.h"
#include "UR_LIGHTS.h"
#include "US_DATA.h"
#include "US_STATUS.h"

#include <iostream>

int main()
{
    // USTAV GOTO
    URGoto urGoto;    
    std::string bufferURGotoOut;
    if (urGoto.GenerateSentence(bufferURGotoOut))
        std::cout << urGoto.GetError();
    
    const std::string bufferURGotoIn = "$URGOT,9991,-180.123456,180.123456,9999.99*50";
    
	if (urGoto.VerifyDataType(bufferURGotoIn))
		if (urGoto.ParseSentence(bufferURGotoIn))
			std::cout << urGoto.GetError();
    
    // USTAV LIGHTS
    URLights urLights;    
    std::string bufferURLightsOut;
    if (urLights.GenerateSentence(bufferURLightsOut))
        std::cout << urLights.GetError();
    
    const std::string bufferURLightsIn = "$URLIG,15,20*43";
    if (urLights.ParseSentence(bufferURLightsIn))
        std::cout << urLights.GetError();

    // USTAV DATA
    USData usData;    
    std::string bufferUSDataOut;
    if (usData.GenerateSentence(bufferUSDataOut))
        std::cout << usData.GetError();
    
    const std::string bufferUSDataIn = "$USDAT,87,0,50,-179,75,-1.123456,0.123456,-99.00,-1,999.99*59";
    if (usData.ParseSentence(bufferUSDataIn))
        std::cout << usData.GetError();

    // USTAV STATUS
    USStatus usStatus;    
    std::string bufferUSStatusOut;
    if (usStatus.GenerateSentence(bufferUSStatusOut))
        std::cout << usStatus.GetError();
    
    const std::string bufferUSStatusIn = "$USSTA,4,150,999,0*49";
    if (usStatus.ParseSentence(bufferUSStatusIn))
        std::cout << usStatus.GetError();

    return 0;
}